package movee.domain.common;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.v3.oas.annotations.media.SchemaProperty;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.SuperBuilder;

import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.NotNull;
import java.io.Serializable;

/**
 *
 *
 * @author movee
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@SuperBuilder
public class BaseBackupConfig implements Serializable {

    /**
     * 表id，自增ID
     */
    @TableId(value = "id", type = IdType.AUTO)
    @SchemaProperty(name = "表id，值为null表示创建，不为null表示更新")
    private Long id;

    /**
     * 优先级
     */
    @TableField(value = "priority")
    @SchemaProperty(name = "优先级")
    @NotNull(message = "priority字段不能为null")
    private Integer priority;

    /**
     * 机房
     */
    @TableField(value = "idc")
    @SchemaProperty(name = "机房")
    private String idc = "";

    @TableField(value = "iaz")
    @SchemaProperty(name = "逻辑机房")
    private String iaz = "";

    @TableField(value = "cluster")
    @SchemaProperty(name = "集群")
    private String cluster = "";

    @TableField(value = "pod")
    @SchemaProperty(name = "pod")
    private String pod = "";

    /**
     * role
     */
    @TableField(value = "role")
    @SchemaProperty(name = "role")
    private String role = "";

    /**
     * vendor
     */
    @TableField(value = "vendor")
    @SchemaProperty(name = "vendor")
    private String vendor = "";

    /**
     * model
     */
    @TableField(value = "model")
    @SchemaProperty(name = "model")
    private String model = "";

    /**
     * 设备类型
     */
    @TableField(value = "device_type")
    @SchemaProperty(name = "设备类型")
    private String deviceType = "";

    /**
     * netadmin1
     */
    @TableField(value = "netadmin1")
    @SchemaProperty(name = "netadmin1")
    @NotNull(message = "netadmin1字段不能为空或null")
    private String netadmin1 = "";

    /**
     * netadmin2
     */
    @TableField(value = "netadmin2")
    @SchemaProperty(name = "netadmin2")
    private String netadmin2 = "";

    /**
     * ftpserver1
     */
    @TableField(value = "ftp_server1")
    @SchemaProperty(name = "ftp server1")
    @NotNull(message = "ftpServer1字段不能为空或null")
    private String ftpServer1 = "";

    /**
     * ftpserver2
     */
    @TableField(value = "ftp_server2")
    @SchemaProperty(name = "ftp server2")
    private String ftpServer2 = "";

    /**
     * 命令模板名
     */
    @TableField(value = "cmd_template")
    @SchemaProperty(name = "命令模板名")
    @NotBlank(message = "cmdTemplate字段不能为null或空")
    private String cmdTemplate = "";

}
